package com.hserver.docker.exception;

import cn.hserver.plugin.web.context.Webkit;
import cn.hserver.plugin.web.interfaces.GlobalException;
import lombok.extern.slf4j.Slf4j;
import cn.hserver.core.ioc.annotation.Bean;

@Bean
@Slf4j
public class WebException implements GlobalException {

    @Override
    public void handler(Throwable throwable, int httpStatusCode, String errorDescription, Webkit webkit) {
        throwable.printStackTrace();
        log.error(throwable.getMessage());
    }
}
